package com.huaixia18.systemnotice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huaixia18.systemnotice.domain.UserSystemNotice;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserSystemNoticeMapper extends BaseMapper<UserSystemNotice> {

    // 根据recipientId和state查询用户系统通知
    List<UserSystemNotice> findByRecipientIdAndState(Long recipientId, boolean state);

    // 根据systemNoticeId和recipientId查询用户系统通知
    UserSystemNotice findBySystemNoticeIdAndRecipientId(Long systemNoticeId, Long recipientId);

}
